import request from '@/utils/request'

// 查询预警管理列表
export function listWarning(query) {
  return request({
    url: '/basicInfo/manager/warning/list',
    method: 'get',
    params: query
  })
}

// 查询预警管理详细
export function getWarning(wId) {
  return request({
    url: '/basicInfo/manager/warning/' + wId,
    method: 'get'
  })
}

// 新增预警管理
export function addWarning(data) {
  return request({
    url: '/basicInfo/manager/warning',
    method: 'post',
    data: data
  })
}

// 修改预警管理
export function updateWarning(data) {
  return request({
    url: '/basicInfo/manager/warning',
    method: 'put',
    data: data
  })
}

// 删除预警管理
export function delWarning(wId) {
  return request({
    url: '/manager/warning/' + wId,
    method: 'delete'
  })
}

// 导出预警管理
export function exportWarning(query) {
  return request({
    url: '/manager/warning/export',
    method: 'get',
    params: query
  })
}